{config_load file=info.conf section="links"}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{#title#}</title>
{#css_style#}{#css_flipPage#}{#js_query#}{#js_getday#}
	<link href="/scripts/jquery-ui-1.9.1.custom/css/ui-lightness/jquery-ui-1.9.1.custom.css" rel="stylesheet">
	<script src="/scripts/jquery-ui-1.9.1.custom/js/jquery-ui-1.9.1.custom.min.js"></script>
</head>
<body>
{include file="head.tpl"}
 <div class="waps">
       <div class="con">     
            <div  class="nopa">
            	<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>
                    <div class="pbox">
				<!--左框架开始 -->
						{include file="railway_left.tpl"}
						<!--左框架结束-->
						<div class="ls_rbox">
							<div class="am_title"><span class="lsfonts_r">编辑</span></div>
							<div class="listers">
                           <table width ="100%">
                           <tr>
	                           <td width="50%">
	                           	<table>
                                  	<tr>
                                          <td class="step_rultxt" valign="middle">
                                          <div class="step_title">始发站->中转站</div>
                                          	始发站：<input id="ss" type="text"  class="step_txt" maxlength="20"  style="width:160px;"/><br/>
                                          	中转站：<select name="_szz" id="szz">
                                          						<option value=""></option>
                                          						{section name=results loop=$tran}
                                          						<option value="{$tran[results]}">{$tran[results]}</option>
                                          						{/section}
                                          						</select><br/>
                                          	20'：<input id="s2g" type="text"  class="step_txt" maxlength="20"  style="width:160px;"/><br/>
                                          	40GP：<input id="s4g" type="text"  class="step_txt" maxlength="20"  style="width:160px;"/><br/>
                                          	40HC：<input id="s4h" type="text"  class="step_txt" maxlength="20"  style="width:160px;"/><br/>
                                          	箱方案：<select name="_sb" id="sb">
                                          						<option value=""></option>
                                          						{section name=results loop=$box}
                                          						<option value="{$box[results]}">{$box[results]}</option>
                                          						{/section}
                                          						</select><br/>
                                          	有效期：<input id="st" class="step_txt" type="text" style=" cursor:pointer;width:160px;" value="" onclick="SelectDate(this,'yyyy\-MM\-dd hh:mm:ss')" readonly="readonly" appendt="{$user->deadline}"/>
                                               			<img class="timebz"  src="../images/timebg.png"  onclick="SelectDate(document.getElementById('st'),'yyyy\-MM\-dd hh:mm:ss')"/><br/>
                                          	备注： <textarea id="sr" class="step_textarea" style="width:260px; height:60px;" ></textarea><br/>
                                          <a href="javascript:modify(1);"><div class="next_btn">保 存</div></a></td> 
                                          </td>
                                      </tr>
                                  </table>
	                           </td>
	                           <td>
	                            <table>
                                  	<tr>
                                          <td class="step_rultxt" valign="middle">
                                          <div class="step_title">中转站->目的站</div>
                                          	中转站：<select name="_szz" id="ezz">
                                          						<option value=""></option>
                                          						{section name=results loop=$tran}
                                          						<option value="{$tran[results]}">{$tran[results]}</option>
                                          						{/section}
                                          						</select><br/>
                                          	目的站：<input id="es" type="text"  class="step_txt" maxlength="20"  style="width:160px;"/><br/>
                                          	20'：<input id="e2g" type="text"  class="step_txt" maxlength="20"  style="width:160px;"/><br/>
                                          	40GP：<input id="e4g" type="text"  class="step_txt" maxlength="20"  style="width:160px;"/><br/>
                                          	40HC：<input id="e4h" type="text"  class="step_txt" maxlength="20"  style="width:160px;"/><br/>
                                          	备注： <textarea id="er" class="step_textarea" style="width:260px; height:60px;" ></textarea><br/>
                                          	<a href="javascript:modify(2);"><div class="next_btn">保 存</div></a></td> 
                                          </td>
                                      </tr>
                                  </table>
							   </td>
                           </tr>
                           </table>
                            </div>
						</div>
						<!--右框架结束-->
					<div class="clear"></div>
</div></div></div></div>
<div id="test"></div>
{include file="foot.tpl"}
<script type="text/javascript">
var ss={$start}
var es={$end}
{literal}
$(document).ready(function(){
	$( "#ss" ).autocomplete({source: ss});
	$( "#es" ).autocomplete({source: es});
});
function modify(i){
	var s=encodeURIComponent($.trim($("#ss").attr("value")));
	var e=encodeURIComponent($.trim($("#es").attr("value")));

	//var z=i==1?encodeURIComponent($.trim($("#szz").find("option:selected").text())):encodeURIComponent($.trim($("#ezz").find("option:selected").text()));
	var z=i==1?encodeURIComponent($.trim($("#szz").val())):encodeURIComponent($.trim($("#ezz").val()));
	var g2=i==1?encodeURIComponent($.trim($("#s2g").attr("value"))):encodeURIComponent($.trim($("#e2g").attr("value")));
	var g4=i==1?encodeURIComponent($.trim($("#s4g").attr("value"))):encodeURIComponent($.trim($("#e4g").attr("value")));
	var h4=i==1?encodeURIComponent($.trim($("#s4h").attr("value"))):encodeURIComponent($.trim($("#e4h").attr("value")));
	var r=i==1?encodeURIComponent($.trim($("#sr").attr("value"))):encodeURIComponent($.trim($("#er").attr("value")));
	
	var y=i==1?encodeURIComponent($.trim($("#sb").val())):"";
	var t=i==1?encodeURIComponent($.trim($("#st").attr("value"))):"";
	
	var params ={act:"modify",i:i,s:s,e:e,z:z,g2:g2,g4:g4,h4:h4,r:r,y:y,t:t};
	$.post('modify.php',params,function(data) {
		//$("#test").html(data);
		alert(data);
	});	
}
</script>{/literal}
</body>
</html>